
<!DOCTYPE html>
<html ng-app="myApp">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<!-- Bootstrap Core CSS -->
<link href="/megaacerto/style/css/bootstrapSpaceLab.css"
	rel="stylesheet">

<link rel="stylesheet" type="text/css"
	href="/megaacerto/style/css/styles.css" />
<!-- PARA FAZER MASCARA FUNCIONAR ANGULAR JS/	-->
<script src="/megaacerto/javascript/recursos/jquery-1.2.6.pack.js"></script>

<!--
	<style type="text/css">
		.modal-body {
			position: static;
			padding-bottom: 18px;
		}
	</style>
 -->
</head>

<body ng-controller="admInserircredito">
	<div ng-include src="'/megaacerto/page/menu.jsp'"></div>
	<div id="wrap">
		<div id="main" class="container clear-top">
			<div class="row">
				<div class="panel panel-primary">
					<div class="panel-heading">
						<h3 class="panel-title">Liberar Saque</h3>
					</div>
					<div class="panel-body">
						<span>{{mensagem}}</span>
						<form class="form-horizontal" name="myForm">
							<div class="form-group">
								<label for="inputCPF" class="control-label col-xs-2">CPF</label>
								<div class="col-xs-6">
									<input id="inputCPF" type="text" ng-model="cpf"
										class="form-control" ng-required="true" ng-cpf ui-mask="999.999.999-99">
								</div><button class="btn btn-primary" ng-click="carregarUsuario();">Buscar</button>
							</div>
							<div class="form-group">
								<label class="control-label col-xs-2">Id usuario</label>
								<div class="col-xs-6">
									<input id="inputId" ng-model="idUsuario" class="form-control" ng-disabled="true"
										>
								</div>
							</div>
							<div class="form-group">
								<label for="inputNome" class="control-label col-xs-2">Nome</label>
								<div class="col-xs-6">
									<input id="inputNome" ng-model="nome" class="form-control" ng-disabled="true"
										>
								</div>
							</div>
							<div class="form-group">
								<label for="inputEmail" class="control-label col-xs-2">Email</label>
								<div class="col-xs-6">
									<input type="email" id="inputEmail" ng-model="email"
										class="form-control" ng-disabled="true" >
								</div>
							</div>
						</form>
							<table class="table table-striped table-hover">
							<thead>
								<tr>
									<th>Id. Pagamento</th>
									<th>Tipo de Pagamento</th>
									<th>Status</th>
									<th>Data Inserçao</th>
									<th>Data Liberação</th>
									<th>Valor</th>
									<th>Ação</th>
								</tr>
							</thead>
							<tbody ng-repeat="pagamento in pagamentos">
								<tr ng-show = "pagamento.tipoPagamento == 'Saque'">
									<th>{{pagamento.idPagamento}}</th>
									<th>{{pagamento.tipoPagamento}}</th>
									<td>{{getStatusPagamento(pagamento.statusDePagamento)}}</td>
									<th>{{pagamento.dtInsercao}}</th>
									<th>{{pagamento.dtPagamento}}</th>
									<td>{{pagamento.valor | currency : 'R$'}}</td>
									<td><button class="btn btn-primary"	ng-click="liberarSaque(pagamento.idPagamento)" ng-disabled="!(pagamento.dtPagamento == '-')">Liberar</button></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!--Criar Pagefooter  -->
	<div ng-include src="'/megaacerto/page/footer.html'"></div>

	<script type="text/javascript"
		src="/megaacerto/javascript/recursos/angular_2.min.js"></script>

	<script type="text/javascript"
		src="/megaacerto/javascript/control/angular-route.js"></script>

	<script type="text/javascript"
		src="/megaacerto/javascript/recursos/ui-utils.js"></script>
	<script src="/megaacerto/javascript/recursos/ng-currency.js"></script>
	
			<script type="text/javascript"
		src="/megaacerto/javascript/recursos/ui-bootstrap-tpls-0.11.0.min.js"></script>
		
	<script type="text/javascript"
		src="/megaacerto/javascript/control/admLiberarSaque.js"></script>

</body>

</html>